package com.tuzhi.atuh.util;

import com.tuzhi.auth.vo.LoginUser;

public class RoleUtils {

    /**
     * 判断指定的登录用户是否包含指定的角色
     *
     * @param loginUser
     * @param roleName
     * @return
     */
    public static boolean roleIsContains(LoginUser loginUser, String roleName) {
        if (loginUser == null) {
            return false;
        }
        if (loginUser.getRoleSet() != null) {
            return loginUser.getRoleSet().contains(roleName);

        }
        return false;
    }
}
